import UserSignIn from '@/views/users/sign_in';
import UserEdit from '@/views/users/edit';

import BindNewUser from '@/views/users/other_sign_in/bind_new_user';
import DirectSignIn from '@/views/users/other_sign_in/direct_sign_in';

import UserShow from '@/views/users/show';

import UserSettings from '@/views/users/settings';
import UserAccount from '@/views/users/settings/password';
import UserOAuth2 from '@/views/users/settings/oauth2';

export default [
  {
    path: '/users/sign_in',
    alias: '/users/sign_up',
    component: UserSignIn,
    meta: { hideHeader: true },
  },
  {
    path: '/users/edit',
    component: UserEdit,
    meta: { requireAuth: true },
  },
  {
    path: '/users/settings',
    component: UserSettings,
    meta: { sidebar: true },
    children: [
      {
        path: 'password',
        alias: '',
        component: UserAccount,
        meta: { requireAuth: true },
      },
      {
        path: 'oauth2',
        component: UserOAuth2,
        meta: { requireAuth: true },
      },
    ],
  },
  {
    path: '/users/:userId/:curTab?',
    component: UserShow,
  },
  {
    path: '/bind_new_user',
    component: BindNewUser,
    meta: { hideHeader: true },
  },
  {
    path: '/direct_sign_in',
    component: DirectSignIn,
    meta: { hideHeader: true },
  },
];
